let Client = require('ssh2').Client

let conn = new Client()
conn.on('ready', function () {
  console.log('Client :: ready 121')
  conn.exec('uptime', function (err, stream) {
    if (err) throw err
    stream.on('close', function (code, signal) {
      console.log('Stream :: close :: code: ' + code + ', signal: ' + signal)
      conn.end()
    }).on('data', function (data) {
      console.log('STDOUT: ' + data)
    }).stderr.on('data', function (data) {
      console.log('STDERR: ' + data)
    })
  })
}).connect({
  host: '192.168.100.121',
  port: 22,
  username: 'root',
  password: '123.com'
})

// {
//   host: '192.168.100.199',
//   port: 22,
//   username: 'root',
//   password: 'Xa88215985'
// }